<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Web Design Studio</title>
<link rel="stylesheet" type="text/css" href="<?php echo base_url();?>style.css" media="screen" />
</head>

<body>
<div id="container">
	
    <div id="head">
		
		<h1><a href="
			<?php if(!isset($_SESSION['admin']) || $_SESSION['admin']!=true)
					echo base_url().'index.php/korisnik';
				else
					echo base_url().'index.php/welcome/mlogiran';
			?>
		" title="">Web Design Studio</a></h1>
		
		<ul id="menu">
			<?php if(!isset($_SESSION['admin']) || $_SESSION['admin']!=true){?>
			<li><a class="current" href="<?php echo base_url();?>index.php/korisnik" title="">Home</a></li>
			<li><a href="<?php echo base_url();?>index.php/korisnik/search" title="">Search</a></li>
			<li><a href="<?php echo base_url();?>index.php/welcome" title="">Login</a></li>
			<?php }else{ ?>
			<li><a class="current" href="<?php echo base_url();?>index.php/welcome/mlogiran" title="">Home</a></li>
			<li><a href="<?php echo base_url();?>index.php/welcome/mlogiran" title="">UP</a></li>
			<li><a href="<?php echo base_url();?>index.php/welcome/admini" title="">Admins</a></li>
			<li><a href="<?php echo base_url();?>index.php/welcome/logout" title="">Logout</a></li>
			<?php } ?>
		</ul>
        
        <div class="top_head_banner">

        </div>
		
	</div>
    
    
    <div id="area">
		
	</div>
    
    
    <div id="main">
	
		<div id="welcome">
			
			
				<h1>Simplify your life</h1>
			
		</div>
		
		<div id="content_left">
        
        <h3>List of subcategories</h3>
		<p>
			<form method="post">
				<table border="1">
					<tr><td>Name of subcategory</td><td>Short description</td><td></td><?php if(count($podkategorii)>0){?><td></td><?php }?></tr>
					<?php 
						foreach($podkategorii as $podkategorija)
						{
							echo"<tr><td>";
							echo anchor('welcome/motvoriPK/'.$podkategorija['id'],$podkategorija['ime']);
							echo"</td><td>";
							echo $podkategorija['opis'];
							echo"</td><td>";
							echo anchor('welcome/mbrisiPK/'.$podkategorija['konKategorija']."/".$podkategorija['id'],'Delete');
							echo"</td><td>";
							echo anchor('welcome/mupdatePK/'.$podkategorija['konKategorija']."/".$podkategorija['id'],'Change');
							echo"</tr>";
						}
					?>
					<tr>
						<td><input type="text" name="imePK"/></td><td><input type="text" name="opisPK"/></td>
						<td><input type="submit" name="submit" value="Insert new"/></td><?php if(count($podkategorii)>0){?><td></td><?php }?>
					</tr>
				</table>
			</form>
		</p>
            
		</div>
        

		
		
		
	<div class="spacer"></div>
	</div>
    
   		<div id="footer">
        
		</div> 
    
	
</div>

</body>
</html>
